package org.example.Day13;

public class UserServiceImpl implements UserService{
    @Override
    public void login(String loginName, String password) throws Exception {
        if("admin".equals(loginName)&&"123456".equals(password)){
            System.out.println("欢迎登录本系统");
        }else{
            System.out.println("登录失败，账号或密码错误");
        }
        Thread.sleep(1000);
    }

    @Override
    public void deleteUsers() throws Exception {
        System.out.println("删除1000个用户");
        Thread.sleep(1500);
    }

    @Override
    public String[] selectUsers() throws Exception {
        System.out.println("查询出3个用户");
        String[] names = {"张全蛋","李二狗","牛爱花"};
        Thread.sleep(500);
        return names;
    }
}
